package com.jiahao.material.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiahao.material.entity.Material;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


public interface MaterialMapper extends BaseMapper<Material> {

    @Select("select material.*,warehouse_material.count from material,warehouse_material " +
            "where mid = material.id and mid in (select mid from warehouse_material where wid = #{wid})")
    public List<Map<String,Object>> getByWid(String wid);
}
